// components/serviceCurrent/serviceCurrent.js
import indexImgSufix from "../../conmon/imageCommon/imageCommon"
Component({
  /**
   * 组件的属性列表
   */
  properties: {

  },

  /**
   * 组件的初始数据
   */
  data: {
    
    blockList:[
      {title:"通行",images:[
        {name:"电子钥匙",url:indexImgSufix.serviceImg+'/pay.png',path:""},
        {name:"访客预约",url:indexImgSufix.serviceImg+'/telephone.png',path:"../../secondary_page/passCheck/passCheck"},
        {name:"人脸上传",url:indexImgSufix.serviceImg+'/invoice.png',path:""},
        {name:"开门设置",url:indexImgSufix.serviceImg+'/open.png',path:""}
      ]},
      {title:"疫情",images:[
        {name:"疫情问诊",url:indexImgSufix.serviceImg+'/yiqing.png',path:""}
      ]},
      {title:"物业",images:[
        {name:"报事报修",url:indexImgSufix.serviceImg+'/repair.png',path:"../../secondary_page/reportForRepair/reportForRepair"},
        {name:"物业电话",url:indexImgSufix.serviceImg+'/telephone.png',path:""},
        {name:"物业公告",url:indexImgSufix.serviceImg+'/notice.png',path:"../../secondary_page/gonggao/gonggao"},
        {name:"投诉反馈",url:indexImgSufix.serviceImg+'/complaint.png',path:"../../secondary_page/complain/complain"}
      ]},
      {title:"缴费",images:[
        {name:"临停缴费",url:indexImgSufix.serviceImg+'/pay.png',path:""},
        {name:"开票中心",url:indexImgSufix.serviceImg+'/invoice.png',path:""},
        {name:"物业缴费",url:indexImgSufix.serviceImg+'/pay.png',path:"../../secondary_page/jiaofei/jiaofei"}
      ]},
      {title:"优选",images:[
        {name:"商城商城",url:indexImgSufix.serviceImg+'/pay.png',path:""}
      ]}],
      show:true,
  },

  /**
   * 组件的方法列表
   */
  methods: {
    // 让弹出层功能改变
    bindDataChange(){
        this.triggerEvent('changeShow',this.data.show)//这里通过triggerEvent将要传的值date和触发的传值事件都发送给父级
    },
    toPage(e){
      const path = e.currentTarget.dataset.index;
      if(path != ''){
        wx.navigateTo({
          url: path
        })
      }
    },
  }
})
